import { NavigatorScreenParams } from '@react-navigation/native';

export interface TimeRecord {
  id: string;
  taskId: string;
  date: string;
  minutes: number;
  timestamp: string;
  isPomodoroMode: boolean;
  pomodoroCount?: number;
}

export interface Category {
  id: string;
  name: string;
  color: string;
  icon?: string;
}

export interface Task {
  id: string;
  title: string;
  coverImage: string;
  totalTimeToday: string;
  isTracking: boolean;
  isPomodoroMode: boolean;
}

export interface DailyStats {
  date: string;
  totalMinutes: number;
  records: TimeRecord[];
  pomodoroCount: number;
}

export interface UserSettings {
  theme: 'light' | 'dark' | 'system';
  defaultPomodoroSettings: {
    workDuration: number;
    breakDuration: number;
    longBreakDuration: number;
    longBreakInterval: number;
  };
  notifications: boolean;
  soundEnabled: boolean;
}

export type RootStackParamList = {
  Main: NavigatorScreenParams<TabParamList>;
  Timer: {
    taskId: string;
    taskTitle: string;
    coverImage: string;
    isPomodoroMode: boolean;
  };
  TaskDetail: {
    taskId: string;
  };
  CategoryManagement: undefined;
  Settings: undefined;
};

export type TabParamList = {
  时间追踪: undefined;
  统计分析: undefined;
  设置: undefined;
};

export interface PomodoroSettings {
  workDuration: number;
  breakDuration: number;
  longBreakDuration: number;
  longBreakInterval: number;
}

export interface DailyTaskTime {
  [taskId: string]: number;
}

export interface TaskTotalTime {
  taskId: string;
  minutes: number;
  date: string;
} 